Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Infer Symbolic Shape No.86, 89】[buaa]Add multiplex number_count op #67387

Merged
merged 9 commits into from
Sep 2, 2024

Conversation

Lans1ot
Copy link
Contributor

@Lans1ot Lans1ot commented Aug 13, 2024

PR Category

CINN

PR Types

Improvements

Description

添加multiplex number_count算子符号推导接口实现。

Copy link

paddle-bot bot commented Aug 13, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Aug 13, 2024
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 14, 2024
@Lans1ot
Copy link
Contributor Author

Lans1ot commented Aug 15, 2024

抱歉,代码中有些命名不规范的地方,比如说里面ins的变量,应该用更加意义明显的变量名。
为了不占用CI资源,等老师review完后再改吧。

@gongshaotian
Copy link
Contributor

抱歉,代码中有些命名不规范的地方,比如说里面ins的变量,应该用更加意义明显的变量名。 为了不占用CI资源,等老师review完后再改吧。

好的

@Lans1ot
Copy link
Contributor Author

Lans1ot commented Aug 27, 2024

multiplex对应测试文件(test_multiplex_op.py)默认打开check_pir,coverage流水线通过
number_count(test_number_count_op.py)未打开,打开后通过测试
image

原number_count测试文件节选

class TestNumberCountOpInt64(op_test.OpTest):
    def setUp(self):
        upper_num = 16
        self.op_type = "number_count"
        self.python_api = number_count_wrapper
        x = np.random.randint(-1, upper_num, size=(1000, 2)).astype('int64')
        self.inputs = {'numbers': x}
        self.outputs = {'Out': count(x, upper_num)}
        self.attrs = {"upper_range": upper_num}

    def test_forward(self):
        self.check_output_with_place(paddle.CUDAPlace(0))

@@ -80,7 +80,9 @@ OP_DECLARE_INFER_SYMBOLIC_SHAPE(Logspace)
// OP_DECLARE_INFER_SYMBOLIC_SHAPE(MergedAdam_)
// OP_DECLARE_INFER_SYMBOLIC_SHAPE(MergedMomentum)
// OP_DECLARE_INFER_SYMBOLIC_SHAPE(MergedMomentum_)
// OP_DECLARE_INFER_SYMBOLIC_SHAPE(Moe)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥添加了个moe的注释

@gongshaotian
Copy link
Contributor

gongshaotian commented Aug 27, 2024

ce测试挂了,先修改一下上述问题,看看能不能解决。

@luotao1 luotao1 merged commit 50f8fa9 into PaddlePaddle:develop Sep 2, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants